<%--
  Created by IntelliJ IDEA.
  User: imac
  Date: 2020/7/28
  Time: 6:00 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--引入标签库   使用JSPL标签库   c为标签的名字 --%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--list 为循环的集合--%>

<html>
<head>
    <title>Title</title>
    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <table class="table table-hover">
        <tr>
            <td>id</td>
            <td>name</td>
            <td>phone</td>
            <td>email</td>
            <td>title</td>
            <td>content</td>
            <td>createdtime</td>
            <td>操作</td>
        </tr>
        <%--list 为循环的集合 var为循环标记 item里为要循环的集合--%>

        <c:forEach var="gb" items="${sessionScope.list}">

            <tr>
                <td>${gb.id}</td>
                <td>${gb.name}</td>
                <td>${gb.phone}</td>
                <td>${gb.email}</td>
                <td>${gb.title}</td>
                <td>${gb.content}</td>
                <td>${gb.createdtime}</td>
                <td>
                    <form action="delete" method="post">
                    <a href="http://localhost:8080/JavaWebPro_war_exploded/manage?q=update&id=${gb.id}&name=${gb.name}&phone=${gb.phone}&email=${gb.email}&title=${gb.title}&content=${gb.content}" class="btn btn-primary"  >修改</a>
                    <a href="http://localhost:8080/JavaWebPro_war_exploded/delete?id=${gb.id}"   class="btn btn-danger" >删除</a>
                    </form>
                </td>
            </tr>
        </c:forEach>

    </table>
    <a href="./add.html" class="btn btn-danger">增加</a>

</div>



</body>
</html>
